package com.freedom.auth.vo;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import cn.afterturn.easypoi.handler.inter.IExcelDataModel;
import cn.afterturn.easypoi.handler.inter.IExcelModel;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable;

@Data
@ExcelTarget("emp_pojo")
public class EmployeeImportVo implements Serializable, IExcelModel, IExcelDataModel {
    @Excel(name = "标识")
    private Long id;

    @NotBlank
    @NotEmpty(message = "全称不能为空")
    @Excel(name = "员工姓名")
    private String username;

    @Excel(name = "密码")
    private String password;

    @Email(message = "请填写正确的邮箱地址")
    @Excel(name = "邮箱")
    private String email;

    @Excel(name = "头像")
    private String headImage;

    @Excel(name = "年龄")
    private Integer age;

    @Excel(name = "所属部门")
    private String departmentName;

    @Length(min = 1, max = 11, message = "请填写正确的手机号")
    @Excel(name = "电话")
    private String phone;


    private Integer rowNum;

    private String errorMsg;


    @Override
    public Integer getRowNum () {
        return this.rowNum;
    }

    @Override
    public void setRowNum ( Integer integer ) {
        this.rowNum = integer;
    }

    @Override
    public String getErrorMsg () {
        return this.errorMsg;
    }

    @Override
    public void setErrorMsg ( String s ) {
        this.errorMsg = s;
    }
}
